/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GameLib;

/**
 *
 * @author angela
 */

import java.applet.Applet;
import java.awt.Graphics;

public class Game extends Applet implements Runnable
{
	Thread thd;
	
	public void init()
	{
		
	}
	
	public void start()
	{
		if(thd==null)
		{
			Thread thd=new Thread(this);
			thd.start();
		}
	}

	public void stop()
	{
		if(thd!=null)
		{
			thd.stop();
			thd=null;
		}
	}

	public void run()
	{
		while(true)
		{
			game();
			
			repaint();
				
			try
			{
				Thread.sleep(50);
			}
			catch(InterruptedException e){}	
		}
	}
	
	public void update(Graphics g)
	{
		paint(g);
	}
	
	public void game()
	{
		
	}

}
